package com.example.swaggerDemo.Dao;


import com.example.swaggerDemo.entity.OrderEntity;
import org.springframework.web.bind.annotation.RequestParam;


import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.List;

public interface OrderDao {

    List<OrderEntity> findUpUserId(@RequestParam("upuserid") String upuserid,
                                   @RequestParam("typedata") String typedata) throws SQLException;

    OrderEntity findwxordeid(@RequestParam("UpOrid") String UpOrid) throws SQLException;

    List<OrderEntity> findUserId(@RequestParam("userid") String userid,
                                 @RequestParam("typedata") String typedata
    )
            throws SQLException;

    List<OrderEntity> findUpUserIdByType(@RequestParam("upuserid") String upuserid,
                                         @RequestParam("typedata") String typedata,
                                         @RequestParam("statustype") String statustype,
                                         @RequestParam("pageindex") int pagindex,
                                         @RequestParam("pagesize") int pagesize
    )
            throws SQLException;

    List<OrderEntity> findUserIdByType(@RequestParam("userid") String userid,
                                       @RequestParam("typedata") String typedata,
                                       @RequestParam("statustype") String statustype,
                                       @RequestParam("pageindex") int pagindex,
                                       @RequestParam("pagesize") int pagesize
    )
            throws SQLException;

    List<OrderEntity> findadminorde(
            @RequestParam("typedata") String typedata,
            @RequestParam("statustype") String statustype,
            @RequestParam("pageindex") int pagindex,
            @RequestParam("pagesize") int pagesize,
            @RequestParam("username") String username
    ) throws SQLException;

    List<OrderEntity> findadminordeisassitant(
            @RequestParam("isassitant") String isassitant,
            @RequestParam("pageindex") int pagindex,
            @RequestParam("pagesize") int pagesize,
              @RequestParam("username") String username
    ) throws SQLException;



    int updatefreeOrderassitant(@RequestParam("id") String id, @RequestParam("assitant") String assitant, @RequestParam("assitantid") String assitantid);

    List<OrderEntity> findAssitantid(@RequestParam("assitantid") String assitantid,
                                     @RequestParam("statustype") String statustype
    ) throws SQLException;

    OrderEntity findOredId(@RequestParam("id") String id) throws SQLException;

    OrderEntity findOredUpId(@RequestParam("uporde") String uporde) throws SQLException;

    OrderEntity findOredtailorde(@RequestParam("tailorde") String tailorde) throws SQLException;

    int insertFreeByUpuserid(@RequestParam("userid") String userid,
                             @RequestParam("preimages") String preimages,
                             @RequestParam("upuserid") String upuserid,
                             @RequestParam("upusername") String upusername,
                             @RequestParam("username") String username,
                             @RequestParam("phone") String phone,    @RequestParam("userimg") String userimg
    ) throws SQLException;

    int insertFree(@RequestParam("userid") String userid,
                   @RequestParam("preimages") String preimages,
                   @RequestParam("username") String username,
                   @RequestParam("phone") String phone,
                   @RequestParam("userimg") String userimg) throws SQLException;

    int inserAgent(@RequestParam("userid") String userid,
                   @RequestParam("preimages") String preimages,
                   @RequestParam("phone") String phone,
                   @RequestParam("address") String address,
                   @RequestParam("username") String username,
                   @RequestParam("hetongmoney") BigDecimal hetongmoney,
                   @RequestParam("upuserid") String upuserid,
                   @RequestParam("upusername") String upusername,    @RequestParam("userimg") String userimg) throws SQLException;

    int insertLocal(@RequestParam("userid") String userid, @RequestParam("phone") String phone,
                    @RequestParam("upuserid") String upuserid, @RequestParam("address") String address
            , @RequestParam("upusername") String upusername, @RequestParam("username") String username,
                    @RequestParam("hetongmoney") BigDecimal hetongmoney,    @RequestParam("userimg") String userimg
    ) throws SQLException;

    int insertFull(@RequestParam("userid") String userid, @RequestParam("phone") String phone,
                   @RequestParam("upuserid") String upuserid, @RequestParam("address") String address
            , @RequestParam("upusername") String upusername, @RequestParam("username") String username,
                   @RequestParam("hetongmoney") BigDecimal hetongmoney,    @RequestParam("userimg") String userimg
    ) throws SQLException;

    int updateOrderType(@RequestParam("id") String id, @RequestParam("status") String status);

    int updateOrderOnce(@RequestParam("id") String id);

    int updatefreeOrderType(@RequestParam("id") String id, @RequestParam("status") String status, @RequestParam("remake") String remake);

    int updateOrderisassitant(@RequestParam("id") String id);

    int updateOrderLocal(@RequestParam("id") String id, @RequestParam("preimages") String preimages);

    int updatetailorde(@RequestParam("id") String id, @RequestParam("tailorde") String tailorde);

    int updauporde(@RequestParam("id") String id, @RequestParam("tailorde") String tailorde);

    int updaupordetpe(@RequestParam("uporde") String uporde);

    int updateOrderLocalOk(@RequestParam("id") String id, @RequestParam("zafei") BigDecimal zafei,
                           @RequestParam("zafeimingxi") String zafeimingxi, @RequestParam("afterimages") String afterimages);

    int updateOrderFull(@RequestParam("id") String id,
                        @RequestParam("preimages") String preimages,

                        @RequestParam("totalprice") BigDecimal totalprice,
                        @RequestParam("hetongimages") String hetongimages
    );

    int updateOrderFulllOk(@RequestParam("id") String id,
                           @RequestParam("zafei") BigDecimal zafei,
                           @RequestParam("zafeimingxi") String zafeimingxi,
                           @RequestParam("afterimages") String afterimages
    );
}